cssprovider: Have a section on import error
authorBenjamin Otte <otte@redhat.com>
Mon, 16 Nov 2015 16:36:50 +0000 (17:36 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 16 Nov 2015 16:39:15 +0000 (17:39 +0100)
commit0a4e88b79b9fa20ae0bd61ff68e99abeb5753da3
tree686e75c7c5f6a7aa07ac4fbe5fea372e9c5c1b4d
parent81cb57b260b22ab2e1a0cb2b29c7c09fd3de128c
cssprovider: Have a section on import error

When loading a nonexisting CSS file using
gtk_css_provider_load_from_file() or gtk_css_provider_load_from_path()
we would emit the error using a NULL scanner. Don't do that, because
we'll have a NULL section in that case and error handlers don't like
that.

Testcase attached.

https://bugzilla.redhat.com/show_bug.cgi?id=1277959
gtk/gtkcssprovider.c
testsuite/gtk/cssprovider.c